<template>
	<view class="stem">
		<!-- <rich-text :nodes="content"></rich-text> -->
		<u-parse :content="content" :tagStyle="style" @imgTap="previewImage"></u-parse>
	</view>

</template>

<script>
	export default {
		props: {
			content: {
				type: String,
				default: ''
			},
		},
		data(){
			return {
				style:{
					// img:'width:100%;max-width:100%;display:block;margin:0 auto;mode:"aspectFit"'
					img:'width:auto;max-width:100%;mode:"widthFix"',
				}
			}
		},
		methods:{
			previewImage(url){
				console.log(url)
				uni.previewImage({
					urls:[url]
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.stem {
		color: #585664;
		max-height: calc(50vh - 200rpx);
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		.setm-text{
			margin-top:20rpx;
		}
		.setm-image{
			text-align: center;
			margin-top: 20rpx;
			image{
				max-width:100%
			}
		}
	}
</style>
